package composite.menu;

//Leaf
public class MenuItem extends MenuComponent {
	String name;
	String description;
	boolean vegetarian;
	double price;
	
	public MenuItem(String name,
					String description,
					boolean vegetarian,
					double price){
		this.name = name;
		this.description = description;
		this.vegetarian = vegetarian;
		this.price = price;
	}

	public String getName() {
		return name;
	}

	public String getDescription() {
		return description;
	}

	public boolean isVegetarian() {
		return vegetarian;
	}

	public double getPrice() {
		return price;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setVegetarian(boolean vegetarian) {
		this.vegetarian = vegetarian;
	}

	public void setPrice(double price) {
		this.price = price;
	}
	
	public void print(){
		System.out.print(" " +getName());
		if(isVegetarian()){
			System.out.print("(v)");
		}
		System.out.println(", "+getPrice());
		System.out.println("   -- "+getDescription());
	}
	
	
}
